projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e1fc27
)
pixelcache: Add a warning for an invariant that shouldn't happen
author
Benjamin Otte
<otte@redhat.com>
Wed, 9 Apr 2014 23:53:57 +0000
(
01:53
+0200)
committer
Benjamin Otte
<otte@redhat.com>
Wed, 9 Apr 2014 23:53:57 +0000
(
01:53
+0200)
Pixel caches should be unmapped before being freed and unmapping clears
those variables.
gtk/gtkpixelcache.c
patch
|
blob
|
history
diff --git
a/gtk/gtkpixelcache.c
b/gtk/gtkpixelcache.c
index 339518bf8a9f14e4e619137fe1b5474d3861ec08..4ab8bb954941d8e9a98a6484075e6fec5ea0c373 100644
(file)
--- a/
gtk/gtkpixelcache.c
+++ b/
gtk/gtkpixelcache.c
@@
-69,6
+69,14
@@
_gtk_pixel_cache_free (GtkPixelCache *cache)
if (cache == NULL)
return;
+ if (cache->timeout_tag ||
+ cache->surface ||
+ cache->surface_dirty)
+ {
+ g_warning ("pixel cache freed that wasn't unmapped: tag %u surface %p sirty %p",
+ cache->timeout_tag, cache->surface, cache->surface_dirty);
+ }
+
if (cache->timeout_tag)
g_source_remove (cache->timeout_tag);